package com.linkhub.oms.admin.modules.logistic.freighttemplate.excel.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.linkhub.oms.admin.modules.user.bankstatement.excel.enums.CurrencyTypeCellMappingEnum;
import com.linkhub.oms.component.excel.annotation.CellPropertyMapping;
import com.linkhub.oms.component.excel.annotation.RequiredProperty;
import com.linkhub.oms.component.excel.converter.CellEnumIntegerConverter;
import com.linkhub.oms.component.excel.converter.LocalDateTimeConverter;
import com.linkhub.oms.entity.LogisticEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * FreightTemplateExcelDataDTO
 *
 * @author Frank
 */
@Data
public class FreightTemplateExcelDataDTO implements Serializable {

    @ApiModelProperty(value = "运费模板名称")
    @ExcelProperty(index = 0)
    @RequiredProperty
    public String templateName;

    @ApiModelProperty(value = "物流渠道名称")
    @ExcelProperty(index = 1)
    @RequiredProperty
    private String channelCName;

    @ApiModelProperty(value = "物流渠道代码")
    @ExcelProperty(index = 2)
    @RequiredProperty
    private String channelCode;

    @ApiModelProperty(value = "国家")
    @ExcelProperty(index = 3)
    @RequiredProperty
    private String countryName;

    @ApiModelProperty(value = "国家二字码")
    @ExcelProperty(index = 4)
    @RequiredProperty
    private String countryCode;

    @ApiModelProperty(value = "分区")
    @ExcelProperty(index = 5)
    private String countryPartition;

    @ApiModelProperty(value = "模板生效日期")
    @ExcelProperty(index = 6, converter = LocalDateTimeConverter.class)
    @RequiredProperty
    private LocalDateTime effectiveDate;

    @ApiModelProperty(value = "模板失效日期")
    @ExcelProperty(index = 7, converter = LocalDateTimeConverter.class)
    @RequiredProperty
    private LocalDateTime expirationDate;

    @ApiModelProperty(value = "计泡系数")
    @ExcelProperty(index = 8)
    @RequiredProperty
    public Integer bubbleCoefficient;

    @ApiModelProperty(value = "实际费用币种")
    @ExcelProperty(index = 9, converter = CellEnumIntegerConverter.class)
    @CellPropertyMapping(mappingEnum = CurrencyTypeCellMappingEnum.class)
    @RequiredProperty
    private Integer actualFeeCurrencyType;

    @ApiModelProperty(value = "最低计费重量")
    @ExcelProperty(index = 10)
    private String minimumChargeableWeight;

    @ApiModelProperty(value = "起始重量")
    @ExcelProperty(index = 11)
    @RequiredProperty
    private String startingWeight;

    @ApiModelProperty(value = "截止重量")
    @ExcelProperty(index = 12)
    @RequiredProperty
    private String endingWeight;

    @ApiModelProperty(value = "对外运费")
    @ExcelProperty(index = 13)
    private String externalFreight;

    @ApiModelProperty(value = "实际运费")
    @ExcelProperty(index = 14)
    private String actualFreight;

    @ApiModelProperty(value = "对外挂号费")
    @ExcelProperty(index = 15)
    private String externalRegistrationFee;

    @ApiModelProperty(value = "实际挂号费")
    @ExcelProperty(index = 16)
    private String actualRegistrationFee;

    /**
     * 渠道
     */
    @JsonIgnore
    private LogisticEntity logisticEntity;
}
